package qingke.command;

import qingke.pojo.User;

public abstract class CommandFactory {
	public static enum CommandCode {
		// system
		EXIT, HELP, LOGIN, SIGNUP,

		// PLAYER
		PRODUCT, BUY, PAY, ORDER, ACCOUNT, DEPOSIT,
	}
	
	public static CommandFactory getFactory(User user){
		if(user==null){
			return new SystemCommandFactory();
		}
		return new UserCommandFactory(user);
	}
	
	public abstract Command buildCommand(CommandCode code);
}
